package com.javaee.ch14.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/")
public class Router {
    @GetMapping("/admin/{dir}/{filename}")
    public String toPage(@PathVariable String dir,@PathVariable String filename) {
        return  dir+"/"+ filename;
    }

    @GetMapping("el/{name}")
    public String toElementUI(@PathVariable String name) {
        return "/el-plus/el-"+name;
    }

    @GetMapping("/login")
    public String login( ) {
        return "/login";
    }

    @GetMapping("/verifyCode")
    public String verifyCode( ) {
        return "/verify/verifyCode";
    }
}


